import request from '@/utils/request';

export function useChatApi() {
  return {
    addQuestion: (data: object) => {
      return request({
        url: `/api/chat/stream`,
        method: 'post',
        data,
      });
    },
    getQuestions: (params: object) => {
      return request({
        url: `/api/chat/issue_list`,
        method: 'get',
        params,
      });
    },
  };
}
